import { Injectable } from '@nestjs/common';
import { InjectModel } from '@nestjs/mongoose';
import { Model } from 'mongoose';
import { Menus, MenusDocument } from 'src/db/schemas/menus.schema';

@Injectable()
export class MenusService {
  constructor(
    @InjectModel(Menus.name) private menusModel: Model<MenusDocument>,
  ) { }
  async getMenusByIds(ids: string[]) {
    const res = await this.menusModel.find({ _id: { '$in': ids } })
    return res
  }
}
